<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>{$title}</title>
	<link rel="stylesheet" href="__CSS__/style.css" />
	<script src="__STATIC__/js/jquery.js"></script>
	<script src="__JS__/scroll.js"></script>
</head>
<body style="background-image:url(__IMG__/home.jpg);background-size:100%;">
	<div class="container">
	
		<div class="home-top">
			<img width="980" src="__IMG__/home-top.png" alt="">
		</div>

		<div class="runking" >
			<ul>
				<li class="title">
					<div class="donor">捐款人</div>
					<div class="money">金额</div>
				</li>
			</ul>
			<div id="page" class="runking-page">
				<ul>
					<foreach name="data" item="vo">
					<li>
						<div class="donor">{$vo.nickname}</div>
						<div class="money">￥{$vo.money}</div>
					</li>
					</foreach>
				</ul>	
			</div>
		</div>

		<div class="last">
			<h4>最新捐款显示</h4>
			<ul>
				<li>捐款人：{$last.nickname}</li>
				<li>金额：{$last.money}</li>
			</ul>
		</div>
	</div>

<script>
$(function(){
	$('#page').myScroll({
        speed: 40, //数值越大，速度越慢
        rowHeight: 46 //li的高度
    });

});
//接收服务消息
$(function(){
  var url='ws://192.168.2.11:8000';
  socket=new WebSocket(url);
  socket.onopen=function(){log('连接成功')}
  socket.onmessage=function(msg){log2('获得消息:'+msg.data);console.log(msg);}
  socket.onclose=function(){log('断开连接')}
});
function log(var1){
  //alert(1);
}
function log2(var1){
  location.reload();
}
</script>

</body>
</html>